//
//  PaySucceedViewController.m
//  PropertyManager
//
//  Created by TNG on 2018/7/16.
//  Copyright © 2018年 Tng. All rights reserved.
//

#import "PaySucceedViewController.h"

@interface PaySucceedViewController ()

@property (strong, nonatomic) UIImageView * img;
@property (strong, nonatomic) UILabel * titleLabel;
@property (strong, nonatomic) UILabel * moneyLabel;
@property (strong, nonatomic) UIButton * btn;

@end

@implementation PaySucceedViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"缴费账单详情";
    [self.view addSubview:self.img];
    [self.view addSubview:self.titleLabel];
    [self.view addSubview:self.moneyLabel];
    [self.view addSubview:self.btn];
    self.moneyLabel.attributedText = [NSMutableAttributedString headStr:@"" AndMiddleStr:@"￥" AndFootStr:@"2000" AndFont:font(16) AndTextColor:SFMNavBarColor];
}

-(UIImageView *)img
{
    if (_img == nil) {
        _img = [[UIImageView alloc] initWithFrame:CGRectMake(0, kStatusAndNavBarH, WIDTH, 176)];
        _img.contentMode = UIViewContentModeScaleAspectFit;
        _img.image = [UIImage imageNamed:@"successful"];
    }
    return _img;
}

-(UILabel *)titleLabel
{
    if (_titleLabel == nil) {
        _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(WIDTH/2  - 50, 156 + kStatusAndNavBarH, 100, 20)];
        _titleLabel.font = font(16);
        _titleLabel.textColor = SFMNavBarColor;
        _titleLabel.textAlignment = NSTextAlignmentCenter;
        _titleLabel.text = @"缴费成功";
    }
    return _titleLabel;
}

-(UILabel *)moneyLabel
{
    if (_moneyLabel == nil) {
        _moneyLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 192 + kStatusAndNavBarH, WIDTH, 30)];
        _moneyLabel.font = font(36);
        _moneyLabel.textColor = SFMNavBarColor;
        _moneyLabel.textAlignment = NSTextAlignmentCenter;
    }
    return _moneyLabel;
}

-(UIButton *)btn
{
    if (_btn == nil) {
        _btn = [[UIButton alloc] initWithFrame:CGRectMake(80, 275 + kStatusAndNavBarH, WIDTH - 160, 50)];
        _btn.layer.cornerRadius = 25;
        [_btn setTitle:@"查看账单" forState:UIControlStateNormal];
        _btn.titleLabel.font = font(16);
        [_btn addTarget:self action:@selector(btnClick) forControlEvents:UIControlEventTouchUpInside];
        [_btn setBackgroundColor:SFMNavBarColor];
    }
    return _btn;
}

-(void)btnClick
{
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
